package com.zhq.blog.core.domain.admin;

import java.util.List;


public class Role {
	
	private String name;	
	private List<AdminControllerDescription> permissionList;
	private List<Operator> operatorList;
	
	public void checkPermission(AdminControllerDescription action){
		if(operatorList != null && operatorList.contains(action)){
			throw new NoPermissionException();
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<AdminControllerDescription> getPermissionList() {
		return permissionList;
	}

	public void setPermissionList(List<AdminControllerDescription> permissionList) {
		this.permissionList = permissionList;
	}

	public List<Operator> getOperatorList() {
		return operatorList;
	}

	public void setOperatorList(List<Operator> operatorList) {
		this.operatorList = operatorList;
	}

	
}
